package com.test.springmvc;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/login")
public class login {

    @RequestMapping("/login.do")
    public String login(String account,String pwd){
        System.out.println(account+"----->"+pwd);
        return "hello";
    }

    @RequestMapping("/{id}/{account}")        //占位符{}
    public String test1(@PathVariable(value = "id")Integer uid,@PathVariable(value = "account")String uaccount){
        System.out.println(uid+"-->"+uaccount);

        return "hello";
    }
}
